package com.thf.controller;

import com.thf.pojo.PmsBrand;
import com.thf.service.IPmsBrandService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@RestController
public class test {
    @Resource
    IPmsBrandService brandService;
    @RequestMapping("/test")
    public boolean test(){
        List<PmsBrand> list = new ArrayList<PmsBrand>();
        for (int i = 0; i < 100; i++) {
            PmsBrand pmsBrand = new PmsBrand();
            pmsBrand.setName("品牌"+i);
            pmsBrand.setFirstLetter("I");
            pmsBrand.setImg("img"+i);
            pmsBrand.setActive(i%2);
            list.add(pmsBrand);
        }
        return brandService.saveBatch(list);
    }
}
